.workflow-design {
  width: 100%;

  .content {
    color: #000;
  }
}

.workflow-design .box-scale {
  display: inline-block;
  position: relative;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  min-width: min-content;
}

.content_label {
  font-weight: 700;
}

.workflow-design {
  .node-wrap {
    display: inline-flex;
    width: 100%;
    flex-flow: column wrap;
    justify-content: flex-start;
    align-items: center;
    padding: 0px 0px;
    position: relative;
    z-index: 2;
  }

  .node-wrap-box {
    display: inline-flex;
    flex-direction: column;
    position: relative;
    width: 220px;
    min-height: 72px;
    flex-shrink: 0;
    background: rgb(255, 255, 255);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
  }

  .node-wrap-box::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0px;
    border-style: solid;
    border-width: 8px 6px 4px;
    border-color: rgb(202, 202, 202) transparent transparent;
  }

  .node-error,
  .start-node-disabled {
    // cursor: default;
    border: 1px solid #00000036 !important;
    box-shadow: 0 2px 5px #00000036 !important;
  }

  .node-wrap-box.start-node:before {
    content: none;
  }

  .node-wrap-box .title {
    height: 24px;
    line-height: 24px;
    margin-top: 8px;
    padding-left: 16px;
    padding-right: 30px;
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: center;

    .text {
      padding-left: 5px;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
      white-space: nowrap;
    }
  }

  .node-wrap-box .title .icon {
    margin-right: 5px;
  }

  .node-wrap-box .title .close {
    font-size: 15px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 10px;
    display: none;
  }

  .node-wrap-box .content {
    position: relative;
    padding: 13px 15px 15px;
  }

  .node-wrap-box .content .placeholder {
    color: #999;
  }

  .node-wrap-box-hover:hover .close {
    display: block;
  }

  .add-node-btn-box {
    width: 240px;
    display: inline-flex;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }

  .add-node-btn-box:before {
    content: '';
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    z-index: -1;
    margin: auto;
    width: 2px;
    height: 100%;
    background-color: rgb(202, 202, 202);
  }

  .add-node-btn {
    user-select: none;
    width: 240px;
    padding: 32px 0px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 1;
  }

  .add-branch {
    justify-content: center;
    padding: 0px 10px;
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center center;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    height: 32px;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    outline: 0;
    transition: 0.1s;
    font-weight: 500;
    font-size: 14px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    vertical-align: middle;
    border-radius: 20px;
    padding: 8px 15px !important;
    color: #67c23a;
    background-color: #f0f9eb;
    // border: 1px solid #b3e19d;
  }

  .add-branch:hover {
    color: #ffffff;
    // border-color: #b3e19d;
    background-color: #67c23a;
  }

  .branch-wrap {
    display: inline-flex;
    width: 100%;
  }

  .branch-box-wrap {
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    min-height: 270px;
    width: 100%;
    flex-shrink: 0;
  }

  .col-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  .branch-box {
    display: flex;
    overflow: visible;
    min-height: 180px;
    height: auto;
    border-bottom: 2px solid #ccc;
    border-top: 2px solid #ccc;
    position: relative;
  }

  .branch-box .col-box {
    background-color: rgb(var(--layout-bg-color) / var(--un-bg-opacity));
  }

  .branch-box .col-box:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    margin: auto;
    width: 2px;
    height: 100%;
    background-color: #cacaca;
  }

  .condition-node {
    display: inline-flex;
    flex-direction: column;
    min-height: 280px;
  }

  .condition-node-box {
    padding-top: 30px;
    padding-right: 50px;
    padding-left: 50px;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    position: relative;
    display: inline-flex;
    flex-direction: column;
  }

  .condition-node-box::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    margin: auto;
    width: 2px;
    height: 100%;
    background-color: rgb(202, 202, 202);
  }

  .auto-judge {
    position: relative;
    width: 220px;
    min-height: 72px;
    background: rgb(255, 255, 255);
    border-radius: 4px;
    padding: 15px 15px;
    cursor: pointer;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
  }

  .auto-judge::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0px;
    border-style: solid;
    border-width: 8px 6px 4px;
    border-color: rgb(202, 202, 202) transparent transparent;
    background: rgb(255 255 255 / 0%);
  }

  .auto-judge .title {
    line-height: 16px;

    .text {
      width: 139px;
      display: block;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
      white-space: nowrap;
    }
  }

  .auto-judge .title .node-title {
    width: 130px;
    color: #15bc83;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
    white-space: nowrap;
  }

  .auto-judge .title .close {
    font-size: 15px;
    position: absolute;
    top: 15px;
    right: 15px;
    color: #999;
    display: none;
  }

  .auto-judge .title .priority-title {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #999;
  }

  .auto-judge .content {
    line-height: 23px;
    position: relative;
    padding-top: 15px;
    min-height: 59px;
  }

  .auto-judge .content .placeholder {
    color: #999;
  }

  .auto-judge-hover:hover {
    .close {
      display: block;
    }

    .priority-title {
      display: none;
    }
  }

  .top-left-cover-line,
  .top-right-cover-line {
    position: absolute;
    height: 5px;
    width: 50%;
    background-color: rgb(var(--layout-bg-color) / var(--un-bg-opacity));
    top: -3px;
  }

  .bottom-left-cover-line,
  .bottom-right-cover-line {
    position: absolute;
    height: 5px;
    width: 50%;
    background-color: rgb(var(--layout-bg-color) / var(--un-bg-opacity));
    bottom: -2px;
  }

  .top-left-cover-line {
    left: -1px;
  }

  .top-right-cover-line {
    right: -1px;
  }

  .bottom-left-cover-line {
    left: -1px;
  }

  .bottom-right-cover-line {
    right: -1px;
  }

  .end-node {
    border-radius: 50%;
    font-size: 14px;
    color: rgba(25, 31, 37, 0.4);
    text-align: left;
  }

  .end-node-circle {
    width: 10px;
    height: 10px;
    margin: auto;
    border-radius: 50%;
    background: #ccc;
  }

  .end-node-text {
    margin-top: 5px;
    text-align: center;
  }

  .auto-judge-hover:hover {
    .sort-left {
      display: flex;
    }

    .sort-right {
      display: flex;
    }
  }

  .auto-judge .sort-left {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .auto-judge .sort-right {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    right: 0;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .auto-judge .sort-left:hover,
  .auto-judge .sort-right:hover {
    background: #eee;
  }

  .auto-judge:after {
    pointer-events: none;
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    border-radius: 4px;
    transition: all 0.1s;
  }

  .auto-judge-def:hover:after {
    border: 1px solid #3296fa;
    box-shadow: 0 0 6px 0 rgba(50, 150, 250, 0.3);
  }

  .node-wrap-box:after {
    pointer-events: none;
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    border-radius: 4px;
    transition: all 0.1s;
  }

  .node-wrap-box-hover:hover:after {
    border: 1px solid #3296fa;
    box-shadow: 0 0 6px 0 rgba(50, 150, 250, 0.3);
  }

  $node-error-border: 1px solid;
  $node-error-box-shadow: 0 0 6px 0;

  .node-error-skip:after,
  .node-error-default:after {
    border: $node-error-border #00000036;
    box-shadow: 0 0 10px 0 #00000069;
  }

  .node-error-waiting:after {
    border: $node-error-border #64a6ea;
    box-shadow: $node-error-box-shadow #64a6ea;
  }

  .node-error-running:after {
    border: $node-error-border #1b7ee5;
    box-shadow: $node-error-box-shadow #1b7ee5;
  }

  .node-error-success:after {
    border: $node-error-border #087da1;
    box-shadow: $node-error-box-shadow #087da1;
  }

  .node-error-fail:after {
    border: $node-error-border #f52d80;
    box-shadow: $node-error-box-shadow #f52d80;
  }

  .node-error-stop:after {
    border: $node-error-border #ac2df5;
    box-shadow: $node-error-box-shadow #ac2df5;
  }

  .node-error-cancel:after {
    border: $node-error-border #f5732d;
    box-shadow: $node-error-box-shadow #f5732d;
  }

  .node-error-decision-failed:after {
    border: $node-error-border #f5732d;
    box-shadow: $node-error-box-shadow #f5732d;
  }

  .error-tip {
    cursor: default;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(960%);
    font-size: 24px;
  }
}

.tags-list {
  margin-top: 15px;
  width: 100%;
}

.add-node-popover-body li {
  display: inline-block;
  width: 80px;
  text-align: center;
  padding: 10px 0;
}

.add-node-popover-body li i {
  border: 1px solid var(--el-border-color-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-align: center;
  line-height: 38px;
  font-size: 18px;
  cursor: pointer;
}

.add-node-popover-body li i:hover {
  border: 1px solid #3296fa;
  background: #3296fa;
  color: #fff !important;
}

.add-node-popover-body li p {
  font-size: 12px;
  margin-top: 5px;
}

.node-wrap-drawer__title {
  padding-right: 40px;
}

.node-wrap-drawer__title label {
  cursor: pointer;
}

.node-wrap-drawer__title label:hover {
  border-bottom: 1px dashed #409eff;
}

.node-wrap-drawer__title .node-wrap-drawer__title-edit {
  color: #409eff;
  margin-left: 10px;
  vertical-align: middle;
}

.dark .workflow-design {
  .node-wrap-box,
  .auto-judge {
    background: #2b2b2b;
  }

  .col-box {
    background: var(--el-bg-color);
  }

  .node-wrap-box::before,
  .auto-judge::before {
    background-color: var(--el-bg-color);
  }

  .end-node .end-node-text {
    color: #d6d6d6;
  }

  .auto-judge .sort-left:hover,
  .auto-judge .sort-right:hover {
    background: var(--el-bg-color);
  }

  .node-wrap-box {
    box-shadow: 0 2px 5px rgb(255 255 255 / 0.1);
  }

  .node-error,
  .start-node-disabled {
    // cursor: default;
    border: 1px solid #ffffff36 !important;
    box-shadow: 0 2px 5px #ffffff36 !important;
  }

  .auto-judge {
    box-shadow: 0 2px 5px 0 rgba(255, 255, 255, 0.1);
  }
}

.dark {
  .add-branch {
    background-color: #3e5a2d;
  }

  .content {
    color: #d6d6d6;
  }
}
